# -*- coding: utf-8 -*-

import re
import sys
import string
import pepe.p_txt.bigtxt as bt

def main(infile):
    """ """
    fname = string.split(infile, '.')[0]
    of = open(fname + 'cyrillic-upper.txt', 'w')

    for line in bt.lines(infile):
        #line = string.upper(line)
        line = re.sub('а','А',line)
        line = re.sub('д','Д',line)
        line = re.sub('г','Г',line)
        line = re.sub('е','Е',line)
        line = re.sub('и','И',line)
        line = re.sub('к','К',line)
        line = re.sub('л','Л',line)
        line = re.sub('п','П',line)
        line = re.sub('т','Т',line)
        line = re.sub('у','У',line)
        line = re.sub('ф','Ф',line)
        line = re.sub('н','Н',line)
        line = re.sub('о','О',line)
        line = re.sub('р','Р',line)
        line = re.sub('с','С',line)
        line = re.sub('м','М',line)
        line = re.sub('в','В',line)
        line = re.sub('ж','Ж',line)
        line = re.sub('й','Й',line)
        line = re.sub('х','Х',line)
        line = re.sub('э','Э',line)
        line = re.sub('з','З',line)
        line = re.sub('ц','Ц',line)
        line = re.sub('ь','Ь',line)
        line = re.sub('ю','Ю',line)
        line = re.sub('ы','Ы',line)
        line = re.sub('щ','Щ',line)
        line = re.sub('ш','Ш',line)
        line = re.sub('я','Я',line)

        of.write(line)
    of.close()

if __name__ == '__main__':
    ''' '''
    if len(sys.argv) != 2:
        print 'Must have argument - file to be processed.'
    else:
        main(sys.argv[1])
